package br.com.skytef.servlet.Printer;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import br.com.skytef.beans.POS.SystemSession;
import br.com.skytef.entity.MessageEntity;

public class PosWait implements Logica{

	@Override
	public String executa(HttpServletRequest req, HttpServletResponse res,
			HttpSession sess) throws Exception {
			
		List<MessageEntity> prints = new ArrayList<MessageEntity>();
		SystemSession sysSess = (SystemSession) sess.getAttribute("SysSession");
			
		sysSess.setMsgsPrinter(prints);
		sysSess.setNextView("/jsp/Printer/print-esperando.jsp");
		sysSess.setNextServlet("PosPrint");
		sess.setAttribute("SysSession",sysSess);
					
		return sysSess.getNextView();
	}

}
